package cs554.androidkids;

import android.app.Activity;
import android.os.Bundle;
import android.widget.GridView;

public class AndroidKids extends Activity {
	/** Called when the activity is first created. */
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		GridView gridview = (GridView) findViewById(R.id.gridview);
		// assume we always have a square board at least 2x2
		assert gridview.getChildCount() == gridview.getNumColumns()
				* gridview.getNumColumns()
				&& gridview.getNumColumns() >= 2;

		gridview.setAdapter(new ImageAdapter(this));
		gridview.setOnItemClickListener(new ClickListener());
	}
}
